package com.tensquare.listener;

import org.springframework.amqp.rabbit.annotation.RabbitHandler;
import org.springframework.amqp.rabbit.annotation.RabbitListener;
import org.springframework.stereotype.Component;

/**
 * Created by WF on 2019/9/21 9:41
 * 消息监听器
 */
@Component
@RabbitListener(queues = "zelin")
public class MyMessageListener {

    //1.接收到使用direct直接模式的消息
    @RabbitHandler
    public void getMessage(String message){
        System.out.println("[接收到使用direct类型消息]：" + message);
    }
}
